From: Zeeshan Ali (Khattak) Date: Tue, 10 Jun 2014 00:24:10 +0000 (+0100) Subject: location: Update available accuracy on max accuracy changing X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~2407 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5a8a293614b9fd7352a5619180b37cfc998ea641;p=gnome-shell.git location: Update available accuracy on max accuracy changing We translate 'On' to available accuracy level but if available accuracy level later changes, we don't update available accuracy level accordingly and hence limit the accuracy of apps. E.g if available accuracy level is 'city' and geolocation is enabled, the max accuracy level would be 'city' and apps can't get higher than that. Now if user plugs in GPS, the available accuracy level will change to 'exact' but without this patch max accuracy level will remain to be 'city' and apps will not be able to use the GPS. https://bugzilla.gnome.org/show_bug.cgi?id=731882 --- diff --git a/js/ui/status/location.js b/js/ui/status/location.js index 8ae76330b..581a53440 100644 --- a/js/ui/status/location.js +++ b/js/ui/status/location.js @@ -191,8 +191,12 @@ const Indicator = new Lang.Class({ let unpacked = properties.deep_unpack(); if ("InUse" in unpacked) this._syncIndicator(); - if ("AvailableAccuracyLevel" in unpacked) + if ("AvailableAccuracyLevel" in unpacked) { this._availableAccuracyLevel = this._proxy.AvailableAccuracyLevel; + + if (this._getMaxAccuracyLevel() != 0) + this._settings.set_enum(MAX_ACCURACY_LEVEL, this._availableAccuracyLevel); + } } });